<template>
  <j-modal
    title="审批详情"
    :width="1100"
    :visible="visible"
    switchFullscreen
    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
    @cancel="handleCancel"
    :footer="null"
    @ok="handleOk"
  >
    <div class="container">
      <Steps :approvalId="approvalId" :currentNodeId="currentNodeId" :isExamine="isExamine" @ok="handleCancel" />
    </div>
  </j-modal>
</template>
<script>
import Steps from './steps'
export default {
  name: 'detailModal',
  components: { Steps },
  props: {
    category: {
      type: String,
      default: '1' //默认案事件，为1
    },
    // 是否审批窗口
    isExamine: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      id: this.$route.params.id,
      approvalId: null, //审批流程id
      currentNodeId: null, //当前审批节点id
      visible: false,
      disableSubmit: false,
      hasOperator: false,
      isViewModel: false, // 是否有权限看模型
      isOperation: false, //控制模型里面按钮权限（审批人不能操作）
      status: ''
    }
  },
  async created() {},
  methods: {
    show(record) {
      this.approvalId = record.id
      this.currentNodeId = record.nodeId
      this.visible = true
    },
    handleCancel(bool) {
      this.visible = false
      if (bool && bool == 'success') {
        this.$emit('ok')
      }
    },
    handleOk() {
      this.visible = false
    }
  }
}
</script>
<style lang="less" scoped>
.con-content {
  .con-content-top {
    width: 80%;
    margin: 10px auto 50px auto;
  }
  // padding-bottom: 50px;
}
/deep/ .ant-modal-body {
  position: relative;
}
.shutBtn {
  position: absolute;
  right: 26px;
  top: 24px;
}
.footerBox {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}
.input {
  width: 90px;
  margin: 0 6px;
}
/deep/.ant-col-15 {
  width: 65%;
}
</style>
